package com.hisysteTopet.hisystepet.controller;


import com.hisysteTopet.hisystepet.bean.Msg;
import com.hisysteTopet.hisystepet.mapper.NoticeMapper;
import com.hisysteTopet.hisystepet.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class NoticeController {
    @Autowired
    private NoticeMapper noticeMapper;

    @Autowired
    private NoticeService noticeService;

    @Autowired
    private Msg msg;

    @ResponseBody
    @RequestMapping("/noticeMessage")
    public Msg noticeMessage(){
        msg = Msg.success().add("messageList",noticeMapper.selectListNotice());
        return msg;
    }
}
